<?php
$menu = $tc->menu(0,2,$lang);
echo '<div id="menuchinh"><a href="index.html"><img style="float:left" src="images/home.gif" alt="" /></a>';
while($row = mysql_fetch_array($menu)){
	echo "<a href=\"{$row['url']}\" style=\"padding:0 10px\">{$row['name']}</a>";
}
echo '</div>';
mysql_free_result($menu);

echo '<div style="clear:both; height:30px"></div>

<div id="sub">';
echo '<ul id="nav">';
$menu = $tc->menu(0,1,$lang);
while($row = mysql_fetch_array($menu)){
	echo "<li><a href=\"{$row['url']}\">{$row['name']}</a>";
	$tc->getSubmenu($row['id'],1,$lang);
	echo '</li>';
}
mysql_free_result($menu);
echo '</ul></div>';